package com.antaohua.tools.system.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.alibaba.fastjson.annotation.JSONField;
import com.antaohua.tools.framework.base.interfase.CreateDateInterfase;
import com.antaohua.tools.framework.base.interfase.UpdateDateInterfase;
import com.antaohua.tools.framework.base.model.UUIDIdentityModel;
import com.antaohua.tools.system.base.model.BaseBusinessModel;

@Entity
@Table(name="SYS_DICT")
public class SysDictEntity extends UUIDIdentityModel implements Serializable, CreateDateInterfase, UpdateDateInterfase{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	
	@Column(name="name",length=32,nullable=false)
	private String name;
	
	@Column(name="code",length=32,nullable=false)
	private String code;
	
	@Column(name = "group_id", length = 36, nullable = false,columnDefinition="char(36)")
	private String groupId;
	
	@Column(name="depict",length=1000,nullable=true)
	private String depict;
	
	
	
	@ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.EAGER)
	@JoinColumn(name = "group_id", insertable = false, updatable = false)
	private SysDictGroupEntity group;

	
	@Column(name = "CREATEDATE", nullable = false)
	private Date createDate;
	@Column(name = "UPDATEDATE")
	private Date updateDate;
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getGroupId() {
		return groupId;
	}

	public void setGroupId(String groupId) {
		this.groupId = groupId;
	}

	public String getDepict() {
		return depict;
	}

	public void setDepict(String depict) {
		this.depict = depict;
	}

	public SysDictGroupEntity getGroup() {
		return group;
	}

	public void setGroup(SysDictGroupEntity group) {
		this.group = group;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}
	
	
	
	
	
	
}
